package com.xkdx.guangguang.fragment.shop;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import com.xkdx.guangguang.module.network.AbsAction;
import com.xkdx.guangguang.module.statics.IConstants;

public class ShopAction extends AbsAction {
	String lon, lat, distance, cityID;
	int pageIndex = 1;

	public ShopAction(String cityID, String lon, String lat, String distance) {
		this.cityID = cityID;
		this.lat = lat;
		this.lon = lon;
		this.distance = distance;
		url = IConstants.addressV2;
	}

	@Override
	public void constructRequest() {
		HashMap<String, String> map = new HashMap<String, String>();
		map.put("DeviceID", "2");
		map.put("RegionID", cityID);
		map.put("Longitude", lon);
		map.put("Latitude", lat);
		map.put("Distance", distance);
		map.put("ShopType", "1");
		map.put("PageIndex", pageIndex + "");
		map.put("PageSize", 10 + "");
		String json = constructJson(map);

		Parameter parameter = new Parameter("shopInterface", "getShopListByShopType", json);
		List<Parameter> list = new ArrayList<Parameter>();
		list.add(parameter);
		requestData = constructMod(list);

	}

}
